//
//  MatchInvestorsView.m
//  BigToBig
//
//  Created by 毛丽媛 on 16/8/3.
//  Copyright © 2016年 cn.cloudtp. All rights reserved.
//

#import "MatchInvestorsView.h"

@implementation MatchInvestorsView

- (instancetype)initWithFrame:(CGRect)frame{
    self = [super initWithFrame:frame];
    if (self) {
        [self createView];
    }
    return self;
}
- (void)createView{
    //头像
    self.headPic = [[UIImageView alloc] init];
    [self addSubview:self.headPic];
    
    //姓名
    self.name = [[UILabel alloc] init];
//    self.name.backgroundColor = [UIColor yellowColor];
    [self addSubview:self.name];
    //职位
    self.position = [[UILabel alloc] init];
    self.position.font = [UIFont systemFontOfSize:13];
    self.position.textColor = [UIColor lightGrayColor];
//    self.position.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:self.position];
    
    //
    self.describe = [[UILabel alloc] init];
    self.describe.font = [UIFont systemFontOfSize:14];
    self.describe.textColor = [UIColor lightGrayColor];
//    self.describe.backgroundColor = [UIColor lightGrayColor];
    [self addSubview:self.describe];
    
    //身份
    self.identity = [[UILabel alloc] init];
    self.identity.font = [UIFont systemFontOfSize:13];
    self.identity.backgroundColor = COLOR_RGBA(70, 214, 147, 1.0);
    self.identity.layer.cornerRadius = 5;
    self.identity.layer.masksToBounds = YES;
    self.identity.textColor = [UIColor whiteColor];
    self.identity.textAlignment = NSTextAlignmentCenter;
    [self addSubview:self.identity];
    
    
    //投资图
    self.firPic = [[UIImageView alloc] init];
//    self.firPic.backgroundColor = [UIColor yellowColor];
    [self addSubview:self.firPic];
    
    //投资项目
    self.Investment = [[UILabel alloc] init];
    self.Investment.font = [UIFont systemFontOfSize:11];
    self.Investment.textColor = [UIColor lightGrayColor];
//    self.Investment.backgroundColor = [UIColor yellowColor];
    [self addSubview:self.Investment];
    
    //融资图
    self.secPic = [[UIImageView alloc] init];
//    self.secPic.backgroundColor = [UIColor cyanColor];
    [self addSubview:self.secPic];
    
    //融资项目
    self.financing = [[UILabel alloc] init];
    self.financing.font = [UIFont systemFontOfSize:11];
    self.financing.textColor = [UIColor lightGrayColor];
//    self.financing.backgroundColor = [UIColor yellowColor];
    [self addSubview:self.financing];
    
    //信用图
    self.thirPic = [[UIImageView alloc] init];
//    self.thirPic.backgroundColor = [UIColor cyanColor];
    [self addSubview:self.thirPic];
    
    //信用值
    self.credit = [[UILabel alloc] init];
    self.credit.font = [UIFont systemFontOfSize:11];
    self.credit.textColor = [UIColor lightGrayColor];
//    self.credit.backgroundColor = [UIColor yellowColor];
    [self addSubview:self.credit];
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    self.headPic.frame = CGRectMake(15, 20, kScreenWidth / 4, kScreenWidth / 4);
    self.name.frame = CGRectMake(self.headPic.maxX + 5,15,100, 25);
    self.identity.frame = CGRectMake(kScreenWidth - 80, 20, 60, 20);
    self.position.frame = CGRectMake(self.headPic.maxX + 5, self.name.maxY + 5, 150, 20);
    self.describe.frame = CGRectMake(self.headPic.maxX + 5, self.position.maxY + 5, kScreenWidth - 20 - self.headPic.x, 20);
    self.firPic.frame = CGRectMake(10, self.headPic.maxY + 15, 20, 20);
    self.Investment.frame = CGRectMake(self.firPic.maxX + 5, self.headPic.maxY + 15, kScreenWidth/3 - 30, 20);
    
    self.secPic.frame = CGRectMake(self.Investment.maxX, self.headPic.maxY + 15, 21, 21);
    self.financing.frame = CGRectMake(self.secPic.maxX + 5, self.headPic.maxY + 15, kScreenWidth/3 - 30, 20);
    
    self.thirPic.frame = CGRectMake(self.financing.maxX, self.headPic.maxY + 15, 20, 20);
    self.credit.frame = CGRectMake(self.thirPic.maxX + 5, self.headPic.maxY + 15, kScreenWidth/3 - 30, 21);
    
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
